﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using tmAsk.Common;

namespace tmAsk.Manager
{
    public partial class menu_right : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            function.CheckAdminLogin();
            this.lblAdminName.Text = Session["adminName"].ToString() + " " + TodayWelcome();
        }

        public string TodayWelcome()
        {
            string hello;
            int hour = Convert.ToInt32(DateTime.Now.Hour.ToString());
            if (hour < 4) hello = "夜深了。";
            else if (hour < 7) hello = "早安。";
            else if (hour < 9) hello = "早上好。";
            else if (hour < 12) hello = "上午好。";
            else if (hour < 14) hello = "中午好。";
            else if (hour < 17) hello = "下午好。";
            else if (hour < 19) hello = "你好。";
            else if (hour < 22) hello = "晚上好。";
            else { hello = "夜深了。"; }
            return hello;
        }
    }
}